﻿@model IEnumerable<NewRen.Models.IntegrationRecord>
@using NewRen.Models;
@using NewRen.Models.ViewModel
@{
    vUser user = ViewBag.user as vUser;
    List<vIntegration> vintegrations = ViewBag.vIntegration as List<vIntegration>;
    ViewBag.Title = "收支明细-积分收支";
    Layout = "~/Views/Shared/_Layout_Show.cshtml";
}
<div class="ucenter-left account-left-border">
    <div class="ucneter-l-head cf">
        <div class="ulhead-headicon">
            @if (user.Picture == null)
            {
                <img src="/Images/userphoto.png" width="50" height="50"
                     alt=@user.UserName style="border-radius:50%;" />
            }
            else
            {
                <img src="/User/ShowPicture/@user.ID" width="50"
                     alt=@user.UserName height="50" style="border-radius:50%;" />
            }

        </div>
        <div class="ulhead-info">
            <p class="ulhead-info-uname">@user.UserName</p>

            <div class="ulhead-info-tool">
                <a class="ulhead-icon icon-lock ucenter-mail " href="/User/PwdEdit/@user.ID" title="修改密码">
                    <div class="ucenter-mail-tip">修改密码</div>
                </a>
                <a href="/User/Edit/@user.ID"
                   class="ulhead-icon icon-setting ucenter-mail" title="设置个人信息"></a>
            </div>
        </div>
    </div>
    <div class="ucenter-l-list">
        <ul class="ullist-ul">
            <li id="uclick">
                <a href="/User/Show/@user.ID">个人中心</a>
            </li>
            <li id="uclick2">
                <a href="/User/DescriptionShow/@user.ID">个人概述</a>
            </li>
            <li id="uclick3">
                <a href="/User/Edit/@user.ID">账号设置</a>
            </li>
            <li id="uclick4" class="active">
                <a href="/User/IntegrationShow/@user.ID">收支明细</a>
            </li>
            <li id="uclick5">
                <a href="/User/CollectManager/@user.ID">我的收藏</a>
            </li>
            <li id="uclick6">
                <a href="/User/BrowseRecord/@user.ID">浏览记录</a>
            </li>
            <!--<li id="uclick7">
                <a href="/User/PayMoney/@user.ID">充值</a>
            </li>-->
        </ul>
    </div>
</div>
<div class="ucenter-right cf">
    <div class="ucenter-right-head">
        <span class="ucenter-right-head-selected"><a href="/User/IntegrationShow/@user.ID">积分收支</a></span>
        <span class="ucenter-right-head-show"><a href="/User/MoneyShow/@user.ID">金钱收支</a></span>
    </div>
    <p class="inte_pt"><span class="inte_sp">积分总数：</span>@user.Integration<span class="inte_sp">金钱总额：</span>@user.Money</p>
    <table class="inte_tbird">
        <tr class="inte_pt">
            <td class="inte_ird0">创建日期</td>
            <td class="inte_ird">收支积分</td>
            <td class="inte_ird">收支类型</td>
            <td class="inte_ird0">交易备注</td>
        </tr>
        @foreach (var item in Model)
        {
            <tr class="inte_pt">
                <td class="inte_ird0">@item.Time</td>
                @if (item.Transaction == TransactionType.Income)
                {
                    <td class="inte_ird">+@item.Integration</td>
                }
                else
                {
                    <td class="inte_ird">-@item.Integration</td>
                }
                <td class="inte_ird">@CommonEnums.TransactionTypeDisply[(int)item.Transaction]</td>
                <td class="inte_ird0">@item.Hint</td>
            </tr>
        }
    </table>
    <div class="left-2">@Html.MakePager()</div> 
</div>